<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    395. Longest Substring with At Least K Repeating Characters
   </h1>
   <p>
    Find the length of the longest substring
    <b>
     <i>
      T
     </i>
    </b>
    of a given string (consists of lowercase letters only) such that every character in
    <b>
     <i>
      T
     </i>
    </b>
    appears no less than
    <i>
     k
    </i>
    times.
   </p>
   <p>
    <b>
     Example 1:
    </b>
   </p>
   <pre>
Input:
s = "aaabb", k = 3

Output:
3

The longest substring is "aaa", as 'a' is repeated 3 times.
</pre>
   <p>
    <b>
     Example 2:
    </b>
   </p>
   <pre>
Input:
s = "ababbc", k = 2

Output:
5

The longest substring is "ababb", as 'a' is repeated 2 times and 'b' is repeated 3 times.
</pre>
  </div>
  <div>
   <h1 class="question_title">
    395. 至少有K个重复字符的最长子串
   </h1>
   <p>
    找到给定字符串（由小写字符组成）中的最长子串
    <strong>
     <em>
      T
     </em>
    </strong>
    ，&nbsp;要求&nbsp;
    <strong>
     <em>
      T
     </em>
    </strong>
    &nbsp;中的每一字符出现次数都不少于
    <em>
     k
    </em>
    。输出
    <strong>
     <em>
      T&nbsp;
     </em>
    </strong>
    的长度。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre>
输入:
s = "aaabb", k = 3

输出:
3

最长子串为 "aaa" ，其中 'a' 重复了 3 次。
</pre>
   <p>
    <strong>
     示例 2:
    </strong>
   </p>
   <pre>
输入:
s = "ababbc", k = 2

输出:
5

最长子串为 "ababb" ，其中 'a' 重复了 2 次， 'b' 重复了 3 次。
</pre>
  </div>
 </body>
</html>